[id].vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <div id="newsList">
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 导航栏 -->
  6. <HomePageNavigation1></HomePageNavigation1>
  7. <!-- 列表页广告一 -->
  8. <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>
  9. <!-- 面包屑导航 -->
  10. <div class="breadcrumb">
  11. <div class="inner">
  12. <span class="location">当前位置:</span>
  13. <el-breadcrumb :separator-icon="ArrowRight">
  14. <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  15. <el-breadcrumb-item :to="{ path: '/specialList/7' }">本网招聘</el-breadcrumb-item>
  16. </el-breadcrumb>
  17. </div>
  18. </div>
  19. <div class="projectMoreBox">
  20. <div class="projectMoreTitle">社会保障在线网</div>
  21. <div class="projectMoreText">
  22. <p><b>政讯通·全国文化旅游项目</b>网络平台由<b>政讯通-全国政务信息一体化办公室</b>主管,联合30多家企事业单位组成,由北京政讯通文化传播有限公司对外牵头运营。</p>
  23. <p><b>政讯通·全国文化旅游项目</b>网络平台有政务、行业独立域名网站各<b>100</b>个和<b>4</b>个综合管理网站共<b>204</b>个网站,按照不同的行业和功能分类为用户提供大体系、广领域、全方位、全过程,有针对性的全国性文化旅游法制综合服务平台。</p>
  24. <p><b>政讯通·全国旅游资讯发布中心</b>是<b>政讯通·全国文化旅游项目</b>网络平台的4个综合管理网站之一,目前开设了栏目上千个,地市中心可全面覆盖我国334个地级市,<b>业务范围</b>涵盖旅游资讯、與情监测、法律咨询、旅游调研、法律宣传、群众监督、旅游安全等领域,日均会员访问量超过万次,累计完成文化旅游领域法制调研课题千余件,网络信息化会员遍布全国各地,实施<b>行业、区域</b>全覆盖,是我国具有广泛传播力、影响力的新型主流媒体。</p>
  25. </div>
  26. </div>
  27. <!-- 资讯列表 -->
  28. <div class="newsList">
  29. <div class="inner">
  30. <div class="innerLeft">
  31. <div class="innerTitle">本网招聘</div>
  32. <ul class="list">
  33. <li v-for="(item, index) in newsList" :key="index">
  34. <NuxtLink :to="item.linkurl" target="_blank" v-show="item.islink == 1">{{ item.title }}
  35. </NuxtLink>
  36. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank"
  37. v-if="item.islink == 0">{{ item.list_title }}
  38. </NuxtLink>
  39. </li>
  40. </ul>
  41. <!-- 分页器 -->
  42. <div class="pagination">
  43. <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
  44. prev-text="上一页" next-text="下一页" @change="changePage" />
  45. </div>
  46. </div>
  47. <div class="innerRight">
  48. <div class="rightMenuTitle">导航列表</div>
  49. <ul>
  50. <li v-for="(item, index) in bottomMenu" :key="index">
  51. <NuxtLink :to="`/speciaArticle/${item.id}`" target="_blank" v-if="item.id == pageId && item.id != 7" class="active">{{ item.name }}</NuxtLink>
  52. <NuxtLink :to="`/speciaArticle/${item.id}`" target="_blank" v-else-if="item.id != pageId && item.id != 7">{{ item.name }}</NuxtLink>
  53. <NuxtLink :to="`/specialList/${item.id}`" target="_blank" v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'" class="active">{{item.name}}</NuxtLink>
  54. <NuxtLink :to="`/specialList/${item.id}`" target="_blank" v-else-if="item.id == 7">{{item.name}}</NuxtLink>
  55. </li>
  56. </ul>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- 列表页广告二 -->
  61. <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>
  62. <!-- 页面底部 -->
  63. <HomeFoot1></HomeFoot1>
  64. </div>
  65. </template>
  66. <script setup>
  67. //1.页面依赖 start ---------------------------------------->
  68. import { onMounted } from 'vue';
  69. import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
  70. import { ArrowRight } from '@element-plus/icons-vue'
  71. const nuxtApp = useNuxtApp();
  72. const axios = nuxtApp.$axios;
  73. //获得跳转过来的id
  74. const route = useRoute();
  75. const pageId = route.params.id;
  76. const routeHref = route.href;
  77. //1.页面依赖 end ---------------------------------------->
  78. //2.页面数据 start ---------------------------------------->
  79. let adList = ref([]);
  80. const {data:adData,error:adError} = requestData('/web/getWebsiteFooterCategory',{method:'GET',query:{'ad_tag':'page'}});
  81. if (adError.value) {
  82. console.error('广告列表请求失败:', adError.value);
  83. } else {
  84. //当有值了以后再放进去,万恶之源,也是nuxt2和3都存在的一个问题,也许nuxt4会解决这个问题
  85. if (adData.value && adData.value.data) {
  86. adList.value = adData.value.data;
  87. console.log(adData.value.data)
  88. }
  89. }
  90. //2.页面数据 end ---------------------------------------->
  91. //4.1 设置seo信息
  92. async function getSeo() {
  93. const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
  94. method: 'GET',
  95. query: {},
  96. });
  97. seoSetup(setData.data.website_head.title,setData.data.website_head.description,setData.data.website_head.keywords)
  98. }
  99. getSeo();
  100. //4.设置seo信息 end---------------------------------------->
  101. //获得广告
  102. // const adList = ref("");
  103. // const aa = 'PAGE'
  104. // const getadList = async () => {
  105. // try {
  106. // const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
  107. // adList.value = response.data;
  108. // } catch (error) {
  109. // console.error(error);
  110. // }
  111. // }
  112. // onMounted(() => {
  113. // getadList()
  114. // })
  115. let changePage = (value) => {
  116. console.log("当前页码", value);
  117. page.value = value
  118. console.log(page.value);
  119. newslists()
  120. }
  121. // 新闻列表
  122. const newsList = useState("newsList", () => '');
  123. const newslists = async () => {
  124. try {
  125. const response = await axios.get(`/web/getWebsiteFooterCategoryList?fcat_id=${pageId}`);
  126. // console.log(response.data.rows);
  127. newsList.value = response.data;
  128. //total.value = response.data.count;
  129. } catch (error) {
  130. console.error(error);
  131. }
  132. }
  133. //获得底部导航
  134. const bottomMenu = ref([]);
  135. const getBottomMenu = async () => {
  136. const response = await axios.get(`/web/getWebsiteFooterCategory`);
  137. bottomMenu.value = response.data;
  138. }
  139. // //热点资讯
  140. // const hotlistall = useState("hotlistall", () => "");
  141. // const hotlist = async () => {
  142. // try {
  143. // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${2}&level=${4}&placeid=${1}`);
  144. // console.log('热点资讯', response.data);
  145. // for (let item of response.data) {
  146. // console.log(item);
  147. // item.count = 1;
  148. // }
  149. // hotlistall.value = response.data;
  150. // } catch (error) {
  151. // console.error(error);
  152. // }
  153. // }
  154. // //资讯推荐1
  155. // const news1 = useState("news1", () => "");
  156. // const newslist1 = async () => {
  157. // try {
  158. // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
  159. // console.log('热点资讯', response.data);
  160. // news1.value = response.data;
  161. // } catch (error) {
  162. // console.error(error);
  163. // }
  164. // }
  165. // const news11 = useState("news11", () => "");
  166. // const newslist11 = async () => {
  167. // try {
  168. // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
  169. // console.log('热点资讯', response.data);
  170. // news11.value = response.data;
  171. // } catch (error) {
  172. // console.error(error);
  173. // }
  174. // }
  175. // //资讯推荐2
  176. // const news2 = useState("news2", () => "");
  177. // const newslist2 = async () => {
  178. // try {
  179. // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
  180. // console.log('热点资讯', response.data);
  181. // news2.value = response.data;
  182. // } catch (error) {
  183. // console.error(error);
  184. // }
  185. // }
  186. // const news22 = useState("news22", () => "");
  187. // const newslist22 = async () => {
  188. // try {
  189. // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
  190. // console.log('热点资讯', response.data);
  191. // news22.value = response.data;
  192. // } catch (error) {
  193. // console.error(error);
  194. // }
  195. // }
  196. //挂载成功钩子函数
  197. onMounted(() => {
  198. // 资讯推荐
  199. newslists()
  200. // 获得左侧导航
  201. getBottomMenu()
  202. // 热点资讯
  203. // hotlist()
  204. // // 资讯推荐
  205. // newslist1()
  206. // newslist2()
  207. // // 热点资讯
  208. // newslist11()
  209. // newslist22()
  210. })
  211. //路由中间件
  212. definePageMeta({
  213. middleware: 'auth'
  214. })
  215. </script>
  216. <style lang="less" scoped>
  217. //导航条
  218. .breadcrumb {
  219. width: 100%;
  220. height: 22px;
  221. margin-bottom: 30px;
  222. font-family: Microsoft YaHei, Microsoft YaHei;
  223. font-weight: 400;
  224. font-size: 20px;
  225. color: #666666;
  226. line-height: 23px;
  227. text-align: left;
  228. font-style: normal;
  229. text-transform: none;
  230. :deep(.el-breadcrumb) {
  231. display: inline-block;
  232. vertical-align: -4px;
  233. }
  234. :deep(.el-breadcrumb__inner a),
  235. :deep(.el-breadcrumb__inner.is-link) {
  236. color: #666666;
  237. font-weight: 400;
  238. text-decoration: none;
  239. transition: var(--el-transition-color);
  240. }
  241. span {
  242. font-family: Microsoft YaHei, Microsoft YaHei;
  243. font-weight: 400;
  244. font-size: 20px;
  245. color: #666666;
  246. line-height: 23px;
  247. text-align: left;
  248. font-style: normal;
  249. text-transform: none;
  250. }
  251. span:hover {
  252. color: #666666;
  253. }
  254. .location {
  255. margin-right: 20px;
  256. width: 100px;
  257. height: 22px;
  258. font-family: Microsoft YaHei, Microsoft YaHei;
  259. font-weight: 400;
  260. font-size: 20px;
  261. color: #666666;
  262. line-height: 23px;
  263. text-align: left;
  264. font-style: normal;
  265. text-transform: none;
  266. }
  267. }
  268. // 资讯列表
  269. .newsList {
  270. width: 100%;
  271. height: 675px;
  272. margin-bottom: 70px;
  273. .inner {
  274. width: 1200px;
  275. .innerLeft {
  276. height: 65px;
  277. line-height: 65px;
  278. font-size: 22px;
  279. color: #028E21;
  280. font-weight: bold;
  281. }
  282. .innerTitle {
  283. font-size: 24px;
  284. }
  285. .innerLeft {
  286. height: 675px;
  287. float: right;
  288. >.list {
  289. height: 570px;
  290. margin-bottom: 70px;
  291. border-top: 1px solid #139602;
  292. >li {
  293. width: 790px;
  294. height: 60px;
  295. white-space: nowrap;
  296. overflow: hidden;
  297. text-overflow: ellipsis;
  298. line-height: 60px;
  299. //border-bottom: 1px solid #D9D9D9;
  300. >a {
  301. width: 360px;
  302. height: 26px;
  303. font-family: Microsoft YaHei, Microsoft YaHei;
  304. font-weight: 400;
  305. font-size: 20px;
  306. color: #333333;
  307. line-height: 26px;
  308. text-align: left;
  309. font-style: normal;
  310. text-transform: none;
  311. }
  312. }
  313. >li:hover>a {
  314. color: #139602;
  315. }
  316. >li:nth-child(1)::after,
  317. >li:nth-child(2)::after {
  318. content: "热";
  319. margin-left: 13px;
  320. background: #FF8A37;
  321. color: #fff;
  322. font-size: 14px;
  323. padding: 0px 2px;
  324. }
  325. >li:nth-child(5n) {
  326. border-bottom: 1px solid #D9D9D9;
  327. }
  328. }
  329. >.pagination {
  330. width: 800px;
  331. height: 34px;
  332. margin-left: 141px;
  333. display: flex;
  334. justify-content: center;
  335. margin: 0;
  336. // 鼠标移入后字体颜色
  337. .el-pagination::v-deep :hover {
  338. color: #139609;
  339. }
  340. .el-pagination.is-background::v-deep .btn-next,
  341. .el-pagination.is-background::v-deep .btn-prev {
  342. width: 70px;
  343. height: 34px;
  344. margin: 0px 10px;
  345. border-radius: 4px;
  346. }
  347. .el-pagination.is-background::v-deep .el-pager li {
  348. margin: 0px 10px;
  349. width: 38px;
  350. height: 34px;
  351. border-radius: 4px;
  352. }
  353. .el-pagination.is-background::v-deep .btn-next.is-active,
  354. .el-pagination.is-background::v-deep .btn-prev.is-active,
  355. .el-pagination.is-background::v-deep .el-pager li.is-active {
  356. background-color: #028e21;
  357. color: #fff;
  358. }
  359. }
  360. }
  361. .innerRight {
  362. width: 279px;
  363. .rightMenuTitle {
  364. width: 279px;
  365. height: 69px;
  366. font-size: 22px;
  367. font-weight: bold;
  368. line-height: 58px;
  369. text-align: center;
  370. color: #fff;
  371. background: url("../../static/special/projectMoreTitle.png") no-repeat;
  372. margin-bottom: 30px;
  373. }
  374. ul {
  375. li {
  376. a {
  377. border-left: 5px solid #028E21;
  378. margin-bottom: 15px;
  379. font-size: 22px;
  380. display: block;
  381. height: 61px;
  382. line-height: 61px;
  383. color: #333333;
  384. text-align: center;
  385. background: #FBFBFB;
  386. }
  387. }
  388. }
  389. .active {
  390. border-left: 0;
  391. border: 1px solid #028E21;
  392. background: #fff;
  393. }
  394. }
  395. }
  396. }
  397. //资讯推荐
  398. .zixuntuijian {
  399. width: 100%;
  400. height: 290px;
  401. margin-bottom: 70px;
  402. .innerLeft {
  403. // 左侧
  404. .zixunLeft {
  405. margin-right: 30px;
  406. }
  407. .zixunRight,
  408. .zixunLeft {
  409. float: left;
  410. width: 380px;
  411. height: 290px;
  412. // 标题部分
  413. >.title {
  414. width: 380px;
  415. }
  416. >.title>h3 {
  417. height: 36px;
  418. font-family: Source Han Sans, Source Han Sans;
  419. font-weight: bold;
  420. font-size: 24px;
  421. color: #000000;
  422. line-height: 28px;
  423. text-align: left;
  424. font-style: normal;
  425. text-transform: none;
  426. border-bottom: 1px solid #139602;
  427. }
  428. >.title>h3>span {
  429. float: right;
  430. width: 56px;
  431. height: 20px;
  432. line-height: 24px;
  433. font-weight: 400;
  434. font-size: 14px;
  435. color: #999999;
  436. font-style: normal;
  437. text-transform: none;
  438. }
  439. .photo_text {
  440. >li:first-child {
  441. width: 380px;
  442. height: 120px;
  443. margin-top: 20px;
  444. margin-bottom: 15px;
  445. position: relative;
  446. >img {
  447. float: left;
  448. width: 160px;
  449. height: 120px;
  450. }
  451. >div {
  452. float: left;
  453. width: 220px;
  454. height: 120px;
  455. padding-left: 15px;
  456. padding-top: 6px;
  457. box-sizing: border-box;
  458. background-color: #f6f6f6;
  459. >h5 {
  460. width: 200px;
  461. height: 54px;
  462. display: -webkit-box;
  463. -webkit-box-orient: vertical;
  464. -webkit-line-clamp: 2;
  465. overflow: hidden;
  466. text-overflow: ellipsis;
  467. word-break: break-all;
  468. font-family: Source Han Sans, Source Han Sans;
  469. font-weight: 500;
  470. font-size: 18px;
  471. color: #333333;
  472. line-height: 26px;
  473. text-align: left;
  474. font-style: normal;
  475. text-transform: none;
  476. }
  477. >p {
  478. width: 200px;
  479. height: 22px;
  480. line-height: 20px;
  481. position: absolute;
  482. bottom: 5px;
  483. right: 0;
  484. >span {
  485. display: inline-block;
  486. // width: 100px;
  487. height: 18px;
  488. font-family: Source Han Sans, Source Han Sans;
  489. font-weight: 400;
  490. font-size: 12px;
  491. color: #999999;
  492. text-align: left;
  493. line-height: 14px;
  494. font-style: normal;
  495. text-transform: none;
  496. }
  497. >span:last-child {
  498. // width: 90px;
  499. text-align: right;
  500. margin-left: 20px;
  501. }
  502. }
  503. }
  504. }
  505. >li {
  506. width: 380px;
  507. height: 25px;
  508. white-space: nowrap;
  509. overflow: hidden;
  510. text-overflow: ellipsis;
  511. font-family: PingFang SC, PingFang SC;
  512. font-weight: 500;
  513. font-size: 18px;
  514. color: #333333;
  515. line-height: 21px;
  516. text-align: left;
  517. font-style: normal;
  518. text-transform: none;
  519. margin-bottom: 10px;
  520. em {
  521. display: inline-block;
  522. width: 8px;
  523. height: 8px;
  524. border-radius: 8px;
  525. margin-right: 10px;
  526. background-color: #d9d9d9;
  527. }
  528. }
  529. >li:hover {
  530. color: #139602;
  531. }
  532. >li:hover em {
  533. background-color: #139602;
  534. }
  535. }
  536. }
  537. }
  538. .innerRight {
  539. width: 381px;
  540. height: 290px;
  541. background-color: #fbfbfb;
  542. >.title {
  543. width: 380px;
  544. height: 40px;
  545. line-height: 40px;
  546. border-top: 1px solid #139602;
  547. border-bottom: 1px solid #e7e7e7;
  548. >h4 {
  549. font-family: Microsoft YaHei, Microsoft YaHei;
  550. font-weight: 400;
  551. margin-left: 20px;
  552. font-size: 20px;
  553. color: #000000;
  554. text-align: left;
  555. font-style: normal;
  556. text-transform: none;
  557. >span {
  558. float: right;
  559. font-family: Microsoft YaHei, Microsoft YaHei;
  560. font-weight: 400;
  561. font-size: 14px;
  562. margin-right: 10px;
  563. color: #999999;
  564. text-align: left;
  565. font-style: normal;
  566. text-transform: none;
  567. }
  568. }
  569. }
  570. .rightList {
  571. height: 540px;
  572. margin-top: 20px;
  573. >li {
  574. height: 100px;
  575. margin-bottom: 10px;
  576. >img {
  577. width: 150px;
  578. height: 100px;
  579. }
  580. >p {
  581. width: 219px;
  582. height: 100px;
  583. padding-left: 12px;
  584. font-family: PingFang SC, PingFang SC;
  585. font-weight: 400;
  586. font-size: 16px;
  587. color: #333333;
  588. line-height: 22px;
  589. text-align: left;
  590. font-style: normal;
  591. text-transform: none;
  592. }
  593. >p:hover {
  594. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  595. }
  596. }
  597. }
  598. }
  599. }
  600. .projectMoreBox {
  601. width: 1200px;
  602. margin: 0 auto;
  603. height: 452px;
  604. margin-top: 20px;
  605. background: url("../../static/special/projectMoreBg.png") no-repeat;
  606. margin-bottom: 40px;
  607. .projectMoreTitle {
  608. color: #028E21;
  609. padding-top: 45px;
  610. font-size: 26px;
  611. padding-left: 204px;
  612. }
  613. .projectMoreText {
  614. padding: 40px;
  615. font-size: 20px;
  616. color: #333333;
  617. text-indent: 2em;
  618. line-height: 36px;
  619. }
  620. }
  621. </style>